package com.ruoyi.sys.vehile.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sys.vehile.mapper.TbMonthPaymentMapper;
import com.ruoyi.sys.vehile.domain.TbMonthPayment;
import com.ruoyi.sys.vehile.service.ITbMonthPaymentService;

/**
 * 月卡缴费Service业务层处理
 *
 * @author ruoyi
 * @date 2022-05-24
 */
@Service
public class TbMonthPaymentServiceImpl implements ITbMonthPaymentService
{
    @Autowired
    private TbMonthPaymentMapper tbMonthPaymentMapper;

    /**
     * 查询月卡缴费
     *
     * @param mpId 月卡缴费主键
     * @return 月卡缴费
     */
    @Override
    public TbMonthPayment selectTbMonthPaymentByMpId(Long mpId)
    {
        return tbMonthPaymentMapper.selectTbMonthPaymentByMpId(mpId);
    }

    /**
     * 查询月卡缴费列表
     *
     * @param tbMonthPayment 月卡缴费
     * @return 月卡缴费
     */
    @Override
    public List<TbMonthPayment> selectTbMonthPaymentList(TbMonthPayment tbMonthPayment)
    {
        return tbMonthPaymentMapper.selectTbMonthPaymentList(tbMonthPayment);
    }

    /**
     * 新增月卡缴费
     *
     * @param tbMonthPayment 月卡缴费
     * @return 结果
     */
    @Override
    public int insertTbMonthPayment(TbMonthPayment tbMonthPayment)
    {
        return tbMonthPaymentMapper.insertTbMonthPayment(tbMonthPayment);
    }

    /**
     * 修改月卡缴费
     *
     * @param tbMonthPayment 月卡缴费
     * @return 结果
     */
    @Override
    public int updateTbMonthPayment(TbMonthPayment tbMonthPayment)
    {
        return tbMonthPaymentMapper.updateTbMonthPayment(tbMonthPayment);
    }

    /**
     * 批量删除月卡缴费
     *
     * @param mpIds 需要删除的月卡缴费主键
     * @return 结果
     */
    @Override
    public int deleteTbMonthPaymentByMpIds(Long[] mpIds)
    {
        return tbMonthPaymentMapper.deleteTbMonthPaymentByMpIds(mpIds);
    }

    /**
     * 删除月卡缴费信息
     *
     * @param mpId 月卡缴费主键
     * @return 结果
     */
    @Override
    public int deleteTbMonthPaymentByMpId(Long mpId)
    {
        return tbMonthPaymentMapper.deleteTbMonthPaymentByMpId(mpId);
    }
}
